package com.example.crt_dispatching_center.service;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import java.util.Map;

public class JsonUtil {

    private static final Gson gson = new GsonBuilder().create();

    public static String convertToJson(Map<String, Object> data) {
        return gson.toJson(data);
    }

    public static <T> String convertObjectToJson(T object) {
        return gson.toJson(object);
    }
}

